import { helpers } from '@/lib/trpc'
import VideoView from '@/modules/studio/views/video-view'
import React from 'react'

export const dynamic = 'force-dynamic'

interface PageProps {
    params: Promise<{ videoId: string }>
}

export default async function Page({ params }: PageProps) {
    const { videoId } = await params
    void helpers.studio.getOne.prefetch({ id: videoId })
    void helpers.categories.getMany.prefetch()

    return (
        <VideoView videoId={videoId} />
    )
}
